package co.edu.javeriana.konigsberg.xavier.dao;

import java.math.BigInteger;
import java.util.List;

import javax.ejb.Stateless;
import javax.persistence.EntityTransaction;

import co.edu.javeriana.konigsberg.xavier.dao.desc.ProgramaLogDAOLocal;
import co.edu.javeriana.konigsberg.xavier.entidad.Programalog;

@Stateless
public class ProgramaLogDAO  extends DAO<Programalog> implements ProgramaLogDAOLocal{
	@Override
	public List<Programalog> obtenerListaPorIdPrograma(BigInteger idPrograma) {
		return (List<Programalog>) em.createNamedQuery("Programalog.findAllByIdProgram").setParameter("idPrograma", idPrograma).getResultList();
	}
	@Override
	public List<Programalog> obtenerLista() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Programalog> obtenerListaPorPadre(BigInteger idPadre) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Programalog obtenerPorId(BigInteger id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void guardar(Programalog programalog) {
		EntityTransaction tx = em.getTransaction();
		tx.begin();
		em.persist(programalog);
		tx.commit();
	}

	@Override
	public void actualizar(Programalog e) {
		// TODO Auto-generated method stub
		
	}

}
